package com.csea.tools.exception;

import com.csea.tools.enums.ResultEnum;

/**
 * 异常处理
 *
 * @author Csea
 * @title
 * @date 2019/12/13 13:17
 */
public class ResultException extends RuntimeException {
    private Integer code;

    public ResultException(ResultEnum resultEnum) {
        super(resultEnum.getMessage());
        this.code = resultEnum.getCode();
    }

    public ResultException(Integer code, String message) {
        super(message);
        this.code = code;
    }
}
